home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / nn.zip / REGEXP.H < prev    next >
C/C++ Source or Header  |  1989-06-28  |  731b  |  31 lines

  1. /*
  2.  * Definitions etc. for regexp(3) routines.
  3.  *
  4.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  5.  * not the System V one.
  6.  */
  7.  
  8. #define NSUBEXP  10
  9. typedef struct regexp {
  10.     char *startp[NSUBEXP];
  11.     char *endp[NSUBEXP];
  12.     char regstart;        /* Internal use only. */
  13.     char reganch;        /* Internal use only. */
  14.     char *regmust;        /* Internal use only. */
  15.     int regmlen;        /* Internal use only. */
  16.     char program[1];    /* Unwarranted chumminess with compiler. */
  17. } regexp;
  18.  
  19.  
  20. /*
  21.  * The first byte of the regexp internal "program" is actually this magic
  22.  * number; the start node begins in the second byte.
  23.  */
  24. #define    MAGIC    0234
  25.  
  26. extern regexp *regcomp();
  27. extern int regexec();
  28. extern void regsub();
  29. extern void regerror();
  30.  
  31.